import { useState } from "react";
import Alert from "./components/alert";
import MemoAlert from "./components/memoalert";

const Chapter14 = (props) => {
    const { title } = props;
    const [count, setCount] = useState(0);
    return (
        <div className='wrapper wrapper3'>
            <div className='page-header'>
                <h3>{title}</h3>
            </div>
            <div className='page-content'>
                <div className='input-group'>
                    <div className='form-control'>数值为:{count}</div>
                    <span className='input-group-btn'>
                        <button
                            className='btn btn-danger'
                            onClick={() => setCount(count + 2)}
                        >
                            ADD
                        </button>
                    </span>
                </div>
                <hr />
                <Alert />
                <MemoAlert />
            </div>
        </div>
    );
};

export default Chapter14;
